package com.niodata.md.rdb.crawler;

import lombok.Getter;
import lombok.Setter;

/**
 * rdb data source config.
 */
@Getter
@Setter
public class DataSourceConfig {
  private String server;
  private int port;
  private String user;
  private String password;
  private String dbCategory;
  private String schema = "";
  private String database = "";
  private String connectionOptions = "";
  private String catalog;
  private String driverClass;

  /**
   * clone new config.
   *
   * @return config
   */
  public DataSourceConfig clone() {
    DataSourceConfig newConfig = new DataSourceConfig();
    newConfig.server = this.server;
    newConfig.port = this.port;
    newConfig.user = this.user;
    newConfig.password = this.password;
    newConfig.dbCategory = this.dbCategory;
    newConfig.schema = this.schema;
    newConfig.database = this.database;
    newConfig.connectionOptions = this.connectionOptions;
    newConfig.catalog = this.catalog;
    newConfig.driverClass = this.driverClass;
    return newConfig;
  }
}
